<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header', 'admin');
?>
<div class="pad_10">
    <div class="table-list">
        <form name="smsform" action="" method="get">
            <input type="hidden" value="goods" name="m">
            <input type="hidden" value="goods" name="c">
            <input type="hidden" value="init" name="a">
            <input type="hidden" value="<?php echo $_GET['menuid'] ?>" name="menuid">
            <table width="100%" cellspacing="0">
                <thead>
                <tr>
                    <th>订单编号</th>
                    <th>产品名称</th>
                    <th>支付宝订单号</th>
                    <th>付款时间</th>
                    <th>联系QQ</th>
                    <th>支付宝</th>
                    <th>支付状态</th>
                    <th>状态</th>
                    <th>数量</th>
                    <th>总价</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <?php
                if (is_array($infos)) {
                    foreach ($infos as $info) {
                        ?>
                        <tr>
                            <td align="center"><?= $info['order_on'] ?></td>
                            <td align="center"><?= $info['goods_name']?></td>
                            <td align="center"><?= $info['pay_num'] ?></td>
                            <td align="center"><?= empty($info['pay_time'])? '' : date('Y-m-d H:i:s',$info['pay_time']) ?></td>
                            <td align="center"><?= $info['accept_qq'];?></td>
                            <td align="center"><?php if($info['pay_type']==1){echo "支付宝";}?></td>
                            <td align="center"><?php if($info['is_pay']==1){echo '<font color="red" class="onError">未付款</font>';}elseif ($info['is_pay']==2){ echo '<font color="green" class="onCorrect">已付款</font>';}?></td>
                            <td align="center"><?php if ($info['is_deny'] == 0){ echo '未发货';}else{ echo '已发货';} ?></td>
                            <td align="center"><?= $info['number']?></td>
                            <td align="center"><?= $info['price']?></td>
                            <td align="center"><?= $info['created_at']?></td>
                            <td align="center">
                                <a href="index.php?m=goods&c=goods&a=goods_export&id=<?= $info['id'] ?>&menuid=<?=$_GET['menuid']?>&pc_hash=<?= $_GET['pc_hash'] ?>">导出TXT</a>
                            </td>
                        </tr>
                        <?php
                    }
                }
                ?>
                </tbody>
            </table>
            <div id="pages"><?php echo $pages?></div>
        </form>
    </div>
</div>
<br>
<br>
</body>
</html>